package com.show.util;

import com.show.common.Result;

/**
 * @author liukai
 */
public class ResultUtil {

    public static Result success(String message, Object object) {
        Result result = new Result();
        result.setSuccess(true);
        result.setMessage(message);
        result.setData(object);
        return result;
    }

    public static Result success(String message) {
        Result result = new Result();
        result.setSuccess(true);
        result.setMessage(message);
        result.setData(null);
        return result;
    }


    public static Result error(String message) {
        Result result = new Result();
        result.setSuccess(false);
        result.setMessage(message);
        return result;
    }


    public static Result error(String message, String error) {
        Result result = new Result();
        result.setSuccess(false);
        result.setMessage(message);
        result.setData(error);
        return result;
    }


}
